package com.itzhoun.topic;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author 周楠
 * @Date 2022/09/12/上午 5:06
 */
@Component
@RabbitListener(queues = "topic.man")
public class TopicReceiver {

    /**
     * 订阅模式获取消息
     * @param messageMap
     */
    @RabbitHandler
    public void receiverTopicMan(Map messageMap){
        System.out.println(" receiverTopicMan接收到消息:" + messageMap.toString());
    }

}
